<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<!--{{request.session}}-->
<!--{{request.COOKIES}}-->
{% if request.session.username %}
<p>
    欢迎{{request.session.username}}登录
</p>
<p>
    <a href="/blog/logout/">退出登录</a>
</p>
<p>
    <a href="/blog/login/">进入我的笔记</a>
</p>
{% else %}
    {% if request.COOKIES.username %}
<p>
    欢迎{{request.COOKIES.username}}登录
</p>
<p>
    <a href="/blog/logout/">退出登录</a>
</p>
<p>
    <a href="">进入我的笔记</a>
</p>
    {% else %}
    <p>
        <a href="/blog/login/">登录</a>
    </p>
    <p>
        <a href="/blog/reg/">注册</a>
    </p>
    {% endif %}
{% endif %}
</body>
</html>
<!---->